home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat3 / Tcl / lreplace.z / lreplace
Encoding:
Text File  |  1998-10-30  |  1.9 KB  |  67 lines

  1.  
  2.  
  3.  
  4. llllrrrreeeeppppllllaaaacccceeee((((3333TTTTccccllll))))                                                  llllrrrreeeeppppllllaaaacccceeee((((3333TTTTccccllll))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      lreplace - Replace elements in a list with new elements
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      llllrrrreeeeppppllllaaaacccceeee _l_i_s_t _f_i_r_s_t _l_a_s_t ?_e_l_e_m_e_n_t _e_l_e_m_e_n_t ...?
  13.  
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      LLLLrrrreeeeppppllllaaaacccceeee returns a new list formed by replacing one or more elements of
  17.      _l_i_s_t with the _e_l_e_m_e_n_t arguments.  _F_i_r_s_t gives the index in _l_i_s_t of the
  18.      first element to be replaced (0 refers to the first element).  If _f_i_r_s_t
  19.      is less than zero then it refers to the first element of _l_i_s_t;  the
  20.      element indicated by _f_i_r_s_t must exist in the list.  _L_a_s_t gives the index
  21.      in _l_i_s_t of the last element to be replaced;  it must be greater than or
  22.      equal to _f_i_r_s_t.  _F_i_r_s_t or _l_a_s_t may be eeeennnndddd (or any abbreviation of it) to |
  23.      refer to the last element of the list.  The _e_l_e_m_e_n_t arguments specify
  24.      zero or more new arguments to be added to the list in place of those that
  25.      were deleted.  Each _e_l_e_m_e_n_t argument will become a separate element of
  26.      the list.  If no _e_l_e_m_e_n_t arguments are specified, then the elements
  27.      between _f_i_r_s_t and _l_a_s_t are simply deleted.
  28.  
  29.  
  30. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  31.      element, list, replace
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.